package com.example.hms.controller;

import com.example.hms.entity.BlackList;
import com.example.hms.entity.Customer;
import com.example.hms.service.BlackListService;
import com.example.hms.service.CustomerService;
import com.example.hms.util.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("blackList")
public class BlackListController {
    @Resource
    private BlackListService blackListService;

    @RequestMapping(value = "/selectAllBlackList",method = RequestMethod.GET)
    public Result selectAllBlackList(String blackListId,String customerName,  String state) {
        return blackListService.selectAllBlackList(blackListId,customerName,state);
    }

    @RequestMapping(value = "/insert",method = RequestMethod.GET )
    public Result insert(BlackList blackList)
    {return blackListService.insert(blackList);}

    @RequestMapping(value = "/update",method = RequestMethod.GET)
    public Result update(BlackList blackList)
    {return blackListService.update(blackList);}

    @RequestMapping(value = "/delete",method = RequestMethod.GET)
    public Result delete(BlackList blackList)
    {return blackListService.delete(blackList);}


}
